#include "MainWindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent) {
    createWidgets();
    /*
    createLayouts();
    connectSignalSlots();
    createActions();
    createMenus();
    */

    setWindowTitle(tr("Connect Four"));
    FIX_WINDOW_SIZE;
}

void MainWindow::mousePressEvent(QMouseEvent * event) {
    qDebug() << event->y();
}

void MainWindow::keyPressEvent(QKeyEvent * event) {
    switch (event->key()) {
    case Qt::Key_Escape:
        close();
        break;
    default:
        QWidget::keyPressEvent(event);
        break;
    }
}

void MainWindow::createWidgets() {
    glCribbage = new GLCribbage(this);
    setCentralWidget(glCribbage);
}

void MainWindow::createLayouts() {

}

void MainWindow::connectSignalSlots() {

}

void MainWindow::connectGameSignalSlots() {

}

void MainWindow::createActions() {

}

void MainWindow::createMenus() {

}
